<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Fetches a result row as an associative or numerically indexed array or both</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="sqlite3result.construct.html">« SQLite3Result::__construct</a></li>
      <li style="float: right;"><a href="sqlite3result.finalize.html">SQLite3Result::finalize »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.sqlite3result.html">SQLite3Result</a></li>
    <li>Fetches a result row as an associative or numerically indexed array or both</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="sqlite3result.fetcharray" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SQLite3Result::fetchArray</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SQLite3Result::fetchArray</span> &mdash; <span class="dc-title">
   Fetches a result row as an associative or numerically indexed array or both
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sqlite3result.fetcharray-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><strong>SQLite3Result::fetchArray</strong></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code><span class="initializer"> = <strong><code>SQLITE3_BOTH</code></strong></span></span>): <span class="type"><span class="type">array</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Fetches a result row as an associative or numerically indexed array or both.
   By default, fetches as both.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sqlite3result.fetcharray-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">mode</code></dt>

     <dd>

      <p class="para">
       Controls how the next row will be returned to the caller. This value
       must be one of either <code class="literal">SQLITE3_ASSOC</code>,
       <code class="literal">SQLITE3_NUM</code>, or <code class="literal">SQLITE3_BOTH</code>.
       <ul class="itemizedlist">
        <li class="listitem">
         <p class="para">
          <code class="literal">SQLITE3_ASSOC</code>: returns an array indexed by column
          name as returned in the corresponding result set
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          <code class="literal">SQLITE3_NUM</code>: returns an array indexed by column
          number as returned in the corresponding result set, starting at
          column 0
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          <code class="literal">SQLITE3_BOTH</code>: returns an array indexed by both
          column name and number as returned in the corresponding result set,
          starting at column 0
         </p>
        </li>
       </ul>
      </p>
     </dd>

    
   </dl>

  </p>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-sqlite3result.fetcharray-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns a result row as an associatively or numerically indexed array or
   both. Alternately will return <strong><code>false</code></strong> if there are no more rows.
  </p>
  <p class="para">
   The types of the values of the returned array are mapped from SQLite3 types
   as follows: integers are mapped to <span class="type">int</span> if they fit into the
   range <strong><code>PHP_INT_MIN</code></strong>..<strong><code>PHP_INT_MAX</code></strong>, and
   to <span class="type">string</span> otherwise. Floats are mapped to <span class="type">float</span>,
   <code class="literal">NULL</code> values are mapped to <span class="type">null</span>, and strings
   and blobs are mapped to <span class="type">string</span>.
  </p>
 </div>


</div></div></div></body></html>